<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.conv</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.conv";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.conv.html" class="symbol">std.conv</a></h1>
  
<div class="summary">Conversion building blocks. These differ from the C equivalents
 <tt>atoi()</tt> and <tt>atol()</tt> by
 checking for overflow and not allowing whitespace.</div>
For conversion to signed types, the grammar recognized is:
 <pre>
<i>Integer</i>:
    <i>Sign UnsignedInteger</i>
    <i>UnsignedInteger</i>
<p class="bl"/>
<i>Sign</i>:
    <b>+</b>
    <b>-</b>
 </pre>
 For conversion to signed types, the grammar recognized is:
 <pre>
<i>UnsignedInteger</i>:
    <i>DecimalDigit</i>
    <i>DecimalDigit</i> <i>UnsignedInteger</i>
 </pre>
<dl>
<dt class="decl">class <a class="symbol _class" name="ConvError" href="./htmlsrc/std.conv.html#L67" kind="class" beg="67" end="73">ConvError</a> : Error; <a title="Permalink to this symbol" href="#ConvError" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L67">#</a></dt>
<dd class="ddef">
<div class="summary">Thrown on conversion errors, which happens on deviation from the grammar.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="ConvError.this" href="./htmlsrc/std.conv.html#L69" kind="ctor" beg="69" end="72">this</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#ConvError.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L69">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">void <a class="symbol _function" name="conv_error" href="./htmlsrc/std.conv.html#L75" kind="function" beg="75" end="78">conv_error</a><span class="params">(char[] <em>s</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#conv_error" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L75">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="ConvOverflowError" href="./htmlsrc/std.conv.html#L83" kind="class" beg="83" end="89">ConvOverflowError</a> : Error; <a title="Permalink to this symbol" href="#ConvOverflowError" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L83">#</a></dt>
<dd class="ddef">
<div class="summary">Thrown on conversion overflow errors.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="ConvOverflowError.this" href="./htmlsrc/std.conv.html#L85" kind="ctor" beg="85" end="88">this</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#ConvOverflowError.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L85">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">void <a class="symbol _function" name="conv_overflow" href="./htmlsrc/std.conv.html#L91" kind="function" beg="91" end="94">conv_overflow</a><span class="params">(char[] <em>s</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#conv_overflow" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L91">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="toInt" href="./htmlsrc/std.conv.html#L100" kind="function" beg="100" end="153">toInt</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toInt" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L100">#</a></dt>
<dt class="decl">uint <a class="symbol _function" name="toUint" href="./htmlsrc/std.conv.html#L225" kind="function" beg="225" end="255">toUint</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toUint" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L225">#</a></dt>
<dt class="decl">long <a class="symbol _function" name="toLong" href="./htmlsrc/std.conv.html#L320" kind="function" beg="320" end="373">toLong</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toLong" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L320">#</a></dt>
<dt class="decl">ulong <a class="symbol _function" name="toUlong" href="./htmlsrc/std.conv.html#L450" kind="function" beg="450" end="480">toUlong</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toUlong" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L450">#</a></dt>
<dt class="decl">short <a class="symbol _function" name="toShort" href="./htmlsrc/std.conv.html#L553" kind="function" beg="553" end="565">toShort</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toShort" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L553">#</a></dt>
<dt class="decl">ushort <a class="symbol _function" name="toUshort" href="./htmlsrc/std.conv.html#L636" kind="function" beg="636" end="648">toUshort</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toUshort" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L636">#</a></dt>
<dt class="decl">byte <a class="symbol _function" name="toByte" href="./htmlsrc/std.conv.html#L714" kind="function" beg="714" end="726">toByte</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toByte" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L714">#</a></dt>
<dt class="decl">ubyte <a class="symbol _function" name="toUbyte" href="./htmlsrc/std.conv.html#L797" kind="function" beg="797" end="809">toUbyte</a><span class="params">(char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toUbyte" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L797">#</a></dt>
<dt class="decl">float <a class="symbol _function" name="toFloat" href="./htmlsrc/std.conv.html#L875" kind="function" beg="875" end="900">toFloat</a><span class="params">(in char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toFloat" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L875">#</a></dt>
<dt class="decl">double <a class="symbol _function" name="toDouble" href="./htmlsrc/std.conv.html#L950" kind="function" beg="950" end="975">toDouble</a><span class="params">(in char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toDouble" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L950">#</a></dt>
<dt class="decl">real <a class="symbol _function" name="toReal" href="./htmlsrc/std.conv.html#L1027" kind="function" beg="1027" end="1052">toReal</a><span class="params">(in char[] <em>s</em>)</span>; <a title="Permalink to this symbol" href="#toReal" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1027">#</a></dt>
<dd class="ddef">
<div class="summary">Convert character string to the return type.</div></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.conv.html#L155" kind="unittest" beg="155" end="218">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L155">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.conv.html#L257" kind="unittest" beg="257" end="314">unittest</a>; <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L257">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:3" href="./htmlsrc/std.conv.html#L375" kind="unittest" beg="375" end="443">unittest</a>; <a title="Permalink to this symbol" href="#unittest:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L375">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:4" href="./htmlsrc/std.conv.html#L482" kind="unittest" beg="482" end="546">unittest</a>; <a title="Permalink to this symbol" href="#unittest:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L482">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:5" href="./htmlsrc/std.conv.html#L567" kind="unittest" beg="567" end="629">unittest</a>; <a title="Permalink to this symbol" href="#unittest:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L567">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:6" href="./htmlsrc/std.conv.html#L650" kind="unittest" beg="650" end="707">unittest</a>; <a title="Permalink to this symbol" href="#unittest:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L650">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:7" href="./htmlsrc/std.conv.html#L728" kind="unittest" beg="728" end="790">unittest</a>; <a title="Permalink to this symbol" href="#unittest:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L728">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:8" href="./htmlsrc/std.conv.html#L811" kind="unittest" beg="811" end="868">unittest</a>; <a title="Permalink to this symbol" href="#unittest:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L811">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:9" href="./htmlsrc/std.conv.html#L902" kind="unittest" beg="902" end="944">unittest</a>; <a title="Permalink to this symbol" href="#unittest:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L902">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:10" href="./htmlsrc/std.conv.html#L977" kind="unittest" beg="977" end="1022">unittest</a>; <a title="Permalink to this symbol" href="#unittest:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L977">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:11" href="./htmlsrc/std.conv.html#L1054" kind="unittest" beg="1054" end="1104">unittest</a>; <a title="Permalink to this symbol" href="#unittest:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1054">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="getComplexStrings" href="./htmlsrc/std.conv.html#L1483" kind="function" beg="1483" end="1528">getComplexStrings</a><span class="params">(in char[] <em>s</em>, out char[] <em>s1</em>, out char[] <em>s2</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#getComplexStrings" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1483">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="feq" href="./htmlsrc/std.conv.html#L1535" kind="function" beg="1535" end="1547">feq</a><span class="params">(in real <em>rx</em>, in real <em>ry</em>, in real <em>precision</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#feq" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1535">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="feq:2" href="./htmlsrc/std.conv.html#L1557" kind="function" beg="1557" end="1569">feq</a><span class="params">(in real <em>r1</em>, in real <em>r2</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#feq:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1557">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="feq:3" href="./htmlsrc/std.conv.html#L1574" kind="function" beg="1574" end="1589">feq</a><span class="params">(in ireal <em>r1</em>, in ireal <em>r2</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#feq:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1574">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">bool <a class="symbol _function" name="feq:4" href="./htmlsrc/std.conv.html#L1594" kind="function" beg="1594" end="1610">feq</a><span class="params">(in creal <em>r1</em>, in creal <em>r2</em>)</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#feq:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.conv.html#L1594">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 03:40:05 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>